package com.heima.search.controller;

import com.heima.common.dto.ResponseResult;
import com.heima.search.dto.ApArticleSearchDto;
import com.heima.search.service.impl.ApUserSearchServiceImpl;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/history")
@Api(tags = "APP用户搜索信息表接口")
public class ApUserSearchController {
    @Autowired
    private ApUserSearchServiceImpl apUserSearchService;

    @PostMapping("/load")
    public ResponseResult loadHistory(@RequestBody ApArticleSearchDto dto) {
        return apUserSearchService.loadHistory(dto);
    }

    @PostMapping("/del")
    public ResponseResult delHistory(@RequestBody ApArticleSearchDto dto) {
        return apUserSearchService.delHistory(dto);
    }
}
